package com.cskaoyan.exception;

import com.cskaoyan.bean.BaseRespVo;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 *
 * 创建日期: 2022/05/07 19:28
 * @author wangyonghong
 */
 @RestControllerAdvice
public class MallContorllerAdvice {

     @ExceptionHandler(ValidationException.class)
    public BaseRespVo  mallContorllerAdvice(ValidationException exception){
         return BaseRespVo.invalidData(exception.getMessage());
     }
}
